#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = 'dong'

import re
# self.checkBoxGroup.addButton(self.obj.ui.checkBox_571, 571)

with open('base.txt', 'r') as f:
    content = f.read()
    ss = re.findall(r'(.+?)\.setText', content)
    for i in ss:
        print i
        print i[-4:]

        with open('a.txt', 'a+') as fd:
            fd.write('self.checkBoxGroup.addButton(' + i + ', ' + i[-4:] +')\n')


# with open('a.txt', 'r') as f:
#     c = f.readlines()
#     for l in c:
#         print l[-5:]
